package com.zt.service;

import com.zt.dao.UserDao;
import com.zt.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName: UserService
 * @Description:
 * @Date: 2020/12/10 15:38
 */
@Service
public class UserService {
    @Autowired
    private UserDao userDao;

    /**
     * 根据id获取名字
     * @param id
     * @return
     */
    public User getUserById(Integer id) {
        User user = userDao.getUser(id);
        return user;
    }

}
